package com.china.great.common.controller;

import com.china.great.common.entity.SysLog;
import com.china.great.common.service.LogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Author: Liu HongYang
 * @DateTime: 2020/5/12 10:12 下午
 * @Description: TODO
 */
@RestController
@Api("日志相关的api")
@RequestMapping("/api/v1")
public class LogController {

    @Autowired
    private LogService logService;

    @RequestMapping(value = "/getLogList", method = RequestMethod.GET)
    @ApiOperation(value="获取列表")
    public Object getList(@RequestParam(value="pageSize", defaultValue="20") int pageSize,
                          @RequestParam(value="pageNum", defaultValue="1") int pageNum){
        List<SysLog> list = logService.getLogList();
        return list;
    }
}
